<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>

<html>
<head>
    <title>申请终端维护</title>
    <script type="text/javascript">
        $(document).ready(function () {
            $("#inputForm").validate({
                                         rules:{
                                             title:{
                                                 required:true
                                             },
                                             content:{
                                                 required:true
                                             }
                                         }
                                     })
        });

        function saveForm() {
            var inputForm = $('#inputForm');
            inputForm.action = "terminal!save.action";
            inputForm.submit();
        }
        function submitForm() {
            var inputForm = $('#inputForm');
            inputForm.attr("action", "terminal!submit.action");
            inputForm.submit();
        }
    </script>
    <meta name="menu" content="submitTerminal"/>
</head>
<body>
<div class="jquery_tab">
    <div class="content_block">
        <h2 class="jquery_tab_title">申请终端维护</h2>

        <form id="inputForm" action="terminal!save.action" method="post">
            <input type="hidden" name="id" value="${id}"/>
            <input type="hidden" name="revision" value="${revision}"/>
            <input type="hidden" name="taskId" value="${task.id}"/>
            <input type="hidden" name="processDefinitionId" value="${processInstanceId}"/>

            <p>
                <label for="createId" class="inline">申请人: </label>
                <code:dispCodeDesc table="ACT_ID_USER" codeColumn="FIRST_" valueColumn="ID" codeValue="${createId}"/>
                <input name="createId" id="createId" type="hidden" value="${createId}"/>
            </p>

            <p>
                <label for="title">标题: </label>
                <input name="title" id="title" type="text" value="${title}" class="input-medium"/>
            </p>

            <p>
                <label for="textarea">内容:</label>
                <textarea name="content" id="textarea" cols="60" rows="10">${content}</textarea>
            </p>

            <p>
                <a class="button" href="javascript:saveForm();"><span>保存</span></a>
                <a class="button" href="javascript:submitForm();"><span>提交</span></a>
                <a class="button" onclick="javascript:history.back()"><span>返回</span></a>
            </p>
        </form>
    </div>
</div>
<c:if test="${processInstanceId!=null}">
    <div class="jquery_tab">
        <%@include file="/WEB-INF/content/workflow/ProcessImage.jsp" %>
    </div>
</c:if>

</body>
</html>
